Skip to content

Reuse query-string separators and start fields directly - #372

Merged
Kludex merged 1 commit into
mainfrom
reuse-querystring-separators
Nov 16, 2026
Merged

Kludex merged 1 commit into
mainfrom
reuse-querystring-separators

Conversation

@Kludex

@Kludex Kludex commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Evaluate the query-string proposal from @deadstrobe5 in issue #365. Reuse the & position found while scanning a field name, and start the next field directly when its first byte is already available. Duplicate and trailing separators keep the existing path.

Add regression tests for field-start events across every two-chunk split and byte-by-byte writes, and for max_size ending at a separator. Both tests also pass against unchanged main.

Local wall-clock timings on CPython 3.13.18, macOS arm64, for the existing large query-string input: 41.3 to 30.7 µs with no-op callbacks, and 54.7 to 43.1 µs with append callbacks. These are local results, not a confirmed portable speedup; the existing CodSpeed benchmark will evaluate the change in CI. No multipart or workflow changes are included.

Validation: scripts/check, scripts/test --strict-config --strict-markers (187 tests, 100% coverage), and scripts/rename pass on Python 3.13.18. An additional 39,360 differential cases against main matched callbacks, consumed bytes, and errors across chunking, strict parsing, and size limits.

Session: pi --session 01a1e0a2-78a9-7473-86ce-b992bd92cf74

View guided diff

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T09:35:52.858106Z cce7324 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codspeed

codspeed Bot commented Nov 16, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 21.52%

1 warning

⚠️ 1 benchmark with a significant change ran on different hardware

Its base and head results were measured on machines with a different CPU, core count or memory, so the change might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚡ 1 improved benchmark
✅ 4 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_parse_querystring_large_form 1,077.8 µs 886.9 µs +21.52%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing reuse-querystring-separators (cce7324) with main (89a8013)

Open in CodSpeed

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Re-trigger cubic

@Kludex
Kludex merged commit 55ba6f4 into main Nov 16, 2026
14 checks passed
@Kludex
Kludex deleted the reuse-querystring-separators branch November 16, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant